package com.tjetc.utils;

import com.tjetc.dao.RoomDao;
import com.tjetc.dao.impl.RoomDaoImpl;

/**
 * @Author: itda
 * @Date: 2024/5/14 11:47
 * @Description: TimerTask
 */
public class TimerTaskUtil extends java.util.TimerTask {
    private RoomDao roomDao = new RoomDaoImpl();

    private Long num1;

    private Short num2;

    public TimerTaskUtil(Long num1, Short num2) {
        this.num1 = num1;
        this.num2 = num2;
    }

    @Override
    public void run() {
        try {
            roomDao.updateStatusById(num1,num2);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
